# kubectl apply -f ./ingress/traefik/dashboard.yaml
# kubectl apply -f ./ingress/traefik/ingress-traefik.yaml

export namespace="kube-system"
export app_name="traefik"
export repo="traefik"
export helm="$repo/$app_name"
export mesh_name="traefik-mesh"
export mesh_helm="$repo/$mesh_name"
export url="https://traefik.github.io/charts"
# export url="oci://ghcr.io/traefik/helm/traefik"

# helm repo remove $repo
# helm repo add $repo $url
helm repo update $repo

# helm search repo traefik --devel --versions

helm upgrade --create-namespace --install \
    -n $namespace $app_name $helm --devel

# --set image.registry="cgr.dev/chainguard" \
# --set image.tag="latest"
# -f values.yaml
# --set image.tag=v3.0 \
# --set deployment.replicas=2 \
# --set autoscaling.enabled=true \
# --set autoscaling.maxReplicas=3

# helm upgrade --create-namespace --install \
#     -n $namespace $mesh_name $mesh_helm --devel \
#     --set proxy.image.tag=v3.0 \
#     --set clusterDomain="youling.io"

# 20240718 可以安装
# helm install traefik oci://ghcr.io/traefik/helm/traefik -n kube-system --devel
